//
//	MCViperCardModel.swift
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation 
import ObjectMapper


class MCViperCardModel : NSObject, NSCoding, Mappable{

	var price : String?
	var subTitle : String?
	var title : String?
    var color:Int?

	class func newInstance(map: Map) -> Mappable?{
		return MCViperCardModel()
	}
	required init?(map: Map){}
	private override init(){}

	func mapping(map: Map)
	{
		price <- map["price"]
		subTitle <- map["subTitle"]
		title <- map["title"]
        color <- map["color"]
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         price = aDecoder.decodeObject(forKey: "price") as? String
         subTitle = aDecoder.decodeObject(forKey: "subTitle") as? String
         title = aDecoder.decodeObject(forKey: "title") as? String
         color = aDecoder.decodeObject(forKey: "color") as? Int
	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if price != nil{
			aCoder.encode(price, forKey: "price")
		}
		if subTitle != nil{
			aCoder.encode(subTitle, forKey: "subTitle")
		}
		if title != nil{
			aCoder.encode(title, forKey: "title")
		}
        if color != nil{
            aCoder.encode(color, forKey: "color")
        }
	}

}
